# test on DEBIAN 7 and php 5.4 Installing PHP-pear sudo apt-get install -y php-pear then dependencies sudo apt-get install -y build-essential php5-dev After I checkout latest version (Now It's 7.0.5) Installing the opcache. sudo pecl install zendopcache Find extension directory sudo find / -name 'opcache.so' Create config file for php nano /etc/php5/mods-available/opcache.ini' Add these stuff in file (check path opcache.so): zend_extension=/usr/lib/php5/20100525...../opcache.so opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 opcache.fast_shutdown=1 opcache.enable_cli=1 Create a symlink for load this: sudo ln -s /etc/php5/mods-available/opcache.ini /etc/php5/conf.d/20-opcache.ini The end restart the apache or there is any php-fpm you must restart this too Then (optionally) finish by cleaning buil tools: sudo apt-get remove --purge build-essential php5-dev --------- check: php -v It should give mention of Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies or: php -i | grep opcache --------